package mianxiangduixiang.Week8.Exam3;

/**
 * @Author JetZhang
 * @Date 2021/11/2
 */
public class Circle extends Shape {

    private int radius;

    public Circle() {
    }

    public Circle(int radius) {
        this.radius = radius;
    }

    public int getRadius() {
        return radius;
    }

    public void setRadius(int radius) {
        this.radius = radius;
    }

    @Override
    public String toString() {
        return "Circle{" +
                "radius=" + radius +
                '}';
    }

    @Override
    public int getArea() {
        return ((int) 3.14 * this.radius * this.radius);
    }
}
